package nullby.omnia;

import nullby.common.utils.CustomLog;
import nullby.omnia.db.DatabaseHelper;
import android.app.Application;

public class ApplicationOmnia extends Application {

	private static final String TAG = ApplicationOmnia.class.getSimpleName();

	private DatabaseHelper dbHelper;

	public static String userId;
	public static String translationId = "1";
	public static String externalVocDbFileName = "ruzh.whd";

	@Override
	public void onCreate() {
		CustomLog.logI(TAG, "onCreate");
		super.onCreate();

		dbHelper = DatabaseHelper.newInstanse(getApplicationContext());
		dbHelper.getWritableDatabase();
	}

	@Override
	public void onLowMemory() {
		CustomLog.logI(TAG, "onLowMemory");
		super.onLowMemory();
		dbHelper.close();
	}

	@Override
	public void onTerminate() {
		CustomLog.logI(TAG, "onTerminate");
		super.onTerminate();
		dbHelper.close();
	}
}
